<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>邀请好友</title>
    <link rel="stylesheet" href="">
    <link rel="stylesheet" href="/main/css/style.css">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
    <script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
    <script>
        wx.config({
            debug: false,
            appId: '{%$signPackage.appId%}',
            timestamp: '{%$signPackage.timestamp%}',
            nonceStr: '{%$signPackage.nonceStr%}',
            signature: '{%$signPackage.signature%}',
            jsApiList: [
                'onMenuShareTimeline',
                'onMenuShareAppMessage'
            ]
        });
        wx.ready(function () {
            var config={
                title: "邀请好友关注公众号并注册会员，即可获得积分入账哦~", // 分享标题
                desc:"邀请好友注册会员就送积分~快点加入组织吧!", // 分享描述
                link: 'http://'+window.location.host+'/register/{%$user.uid|default:0%}', // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
                imgUrl: 'http://'+window.location.host+'/images/share.jpg', // 分享图标

            };
            wx.onMenuShareTimeline(config);
            wx.onMenuShareAppMessage(config);
        });
    </script>
</head>
<body>
<!--fixed remove-->
<!--fixed remove-->
<section class="fixed" style="z-index:999;width: 100%;height: 100%;background-color: #000;position: fixed;left: 0;top: 0;"></section>
<section class="invite_page">
    <div class="pop_item pop_modal_page">
            <span class="inner_bg">
                <span class="close_btn"></span>
            </span>
    </div>
    <div><img src="/main/img/invite_01.jpg" width="100%" height="auto"></div>
    <div><img src="/main/img/invite_02.jpg" width="100%" height="auto"></div>
    <div><img src="/main/img/invite_03.jpg" width="100%" height="auto"></div>
    <div><img src="/main/img/invite_04.jpg" width="100%" height="auto"></div>
    <div class="relative">
        <img src="/main/img/invite_05.jpg" width="100%" height="auto">
        <div class="wrapBar">
            <div class="inner" style="width:{%$pess|default:0%}"></div>
        </div>
    </div>
    <div class="hint">您还需要邀请<span class="f_num num ">{%$num|default:30%}</span>位好友，即可获得<span class="num">1000</span>积分</div>
    {%if $count eq 30 && $user.ischange eq 0%}
    <span class="tj_btn" onclick="doreceive()">领取1000积分</span>
    {%else%}
    <span class="tj_btn gray_btn">领取1000积分</span>
    {%/if%}

</section>
</body>
<script src="/main/js/jquery-1.12.3.min.js"></script>
<script src="/main/js/common.js"></script>
<script>
    $(window).load(function () {
        touchEvent();
        $(".pop_modal_page .close_btn").on('click', closePopModal);
    });


    function closePopModal() {
        $(".pop_modal_page").fadeOut();
    }

  {%if $count eq 30%}
  function  doreceive() {
        $.get('/api/doreceive.json',function (data,status) {
            alert(data);
            window.location.reload();
        })
    }
  {%/if%}

</script>
</html>
